package leetcode.code1637;

import java.util.Arrays;

public class Solution {

	public int maxWidthOfVerticalArea(int[][] points) {
		Arrays.sort(points, (a, b) -> a[0] - b[0]);
		int last = points[0][0];
		int ans = 0;
		for (int i = 1; i < points.length; i++) {
			int p = points[i][0];
			if (p != last) {
				int cur = p - last;
				if (cur > ans) {
					ans = cur;
				}
				last = p;
			}
		}
		return ans;
	}

//	作者：wa-pian-d
//	链接：https:// leetcode-cn.com/problems/widest-vertical-area-between-two-points-containing-no-points/solution/1637-liang-dian-zhi-jian-bu-bao-han-ren-oqea2/
//	来源：力扣（LeetCode）著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。
}
